/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.emex.app.web;

import com.emex.app.shared.data.Provider;
import com.emex.app.shared.ws.ProviderWebService;
import com.emex.app.web.service.ProviderService;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;

/**
 *
 * @author Sergey Karavaev
 */
@WebService(serviceName = "ProviderWS", portName = "ProviderWSPort", targetNamespace = "http://emex.com/Provider")
@Stateless(name = "ProviderWS")
public class ProviderWS extends SpringBeanAutowiringSupport implements ProviderWebService {

    @Autowired
    private ProviderService providerService;

    @Override
    public int deleteProviderByPrimaryKey(Integer id) {
        return providerService.deleteProviderByPrimaryKey(id);
    }

    @Override
    public Provider insertProvider(Provider record) {
        return providerService.insertProvider(record);
    }

    @Override
    public List<Provider> getAllProviders() {
        return providerService.getAllProviders();
    }

    @Override
    public Provider updateProvider(Provider record) {
        return providerService.updateProvider(record);
    }

    @Override
    public Provider selectProviderByPrimaryKey(Integer id) {
        return providerService.selectProviderByPrimaryKey(id);
    }
}
